package root.loan;

import exceptions.HasAlreadyDoneException;
import exceptions.LoanHasAlreadyBeenApprovedException;
import exceptions.PermissionDeniedException;

/**
 * State do emprestimo em que o emprestimo eh cancelado e confirmado devolvido pelo dono
 * @author Danilo
 *
 */
public class CanceledComplete extends Canceled{

	@Override
	public boolean isComplete(){
		return true;
	}
	@Override
	public void returnItem(Borrow borrow) throws HasAlreadyDoneException {
		throw new HasAlreadyDoneException("Item já devolvido");
	}
	
	@Override
	public void requestDevolution(Borrow borrow) throws HasAlreadyDoneException {
		throw new HasAlreadyDoneException("Item já devolvido");
	}
	
	@Override
	public void complete(Borrow borrow) throws HasAlreadyDoneException {
		throw new HasAlreadyDoneException("Término do empréstimo já confirmado");
	}
	
	@Override
	public void cancel(Borrow borrow) throws HasAlreadyDoneException {
		throw new HasAlreadyDoneException("Item já devolvido");
	}
	
}
